home *** CD-ROM | disk | FTP | other *** search
- Path: news.luc.edu!user
- From: VArase@varase.it.luc.edu (Verne Arase)
- Newsgroups: comp.lang.c
- Subject: Re: given: char foo[80]; there is no such thing as element foo[
- Date: Fri, 15 Mar 1996 16:41:31 -0600
- Organization: LUMC
- Message-ID: <AD6F4E3B9668B8092@mcdialb09.it.luc.edu>
- References: <3148DBB6.1353@hawaii.edu>
- NNTP-Posting-Host: 147.126.240.125
-
- In article <3148DBB6.1353@hawaii.edu>,
- Dave Carien <davec@hawaii.edu> wrote:
-
- >Yes or no on this, I just recently got confused by two different books. I
-
- >assume that the declaration foo[80] allocates storage for elements 0-79.
- >A string could be terminated by doing something like foo[79] = '\0', but
- >foo[80] = '\0' would be invalid because such an element does not exist.
- >Just looking for confirmation that I'm right here. A simple Y or N will
- >do thanks.
-
- Y :-).
-
- Assigning a value to foo[80] _could_ result in a storage overlay.
-
- ---
- The above are my own opinions, and not those of my employer.
-